<?php
namespace app\home\controller;

use app\common\controller\Indexbase;
use weixinhack\WxBase;

class Wxpay extends Indexbase {
    //  打包支付宝配置
    public function conf(){

    }
    //  微信扫码支付
    public function get_saoma($data){
        $wxmodel = new WxBase();
        $oreder = $wxmodel->pay_add($this->webdb,$data,'NATIVE');
        if($oreder['return_code'] == 'SUCCESS' && $oreder['return_msg'] == 'OK' && $oreder['result_code'] == 'SUCCESS'){
            $url = 'http://qr.liantu.com/api.php?text='.$oreder['code_url'];
            return $url;
        }else{
            return false;
        }
    }

}
